package com.daka.service.impl;

import com.daka.dao.TeamDao;
import com.daka.entity.Team;
import com.daka.service.TeamService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author beliveli on 2016/3/31 0031.
 */
@Service("teamService")
@SuppressWarnings("unused")
public class TeamServiceImpl implements TeamService {

    @Resource(name = "teamDao")
    private TeamDao teamDao;

    @Override
    public List<Team> findList() {
        return teamDao.selectAll();
    }

    @Override
    public Team findById(Long id) {
        return teamDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateById(Team team) {
        return teamDao.updateByPrimaryKeySelective(team);
    }

    @Override
    public List<Team> selectArea() {
        return teamDao.selectArea();
    }

    @Override
    public List<Team> selectByArea(Long area) {
        return teamDao.selectByArea(area);
    }
}
